package com.hdax.dmw.scheduler.mappers;

import com.hdax.dmw.entity.scheduler.SchedulerSeat;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
* @author guoyisha
* @description 针对表【dm_scheduler_seat(排期座位表)】的数据库操作Mapper
* @createDate 2023-07-24 14:56:40
* @Entity com.hdax.dmw.entity.scheduler.SchedulerSeat
*/
public interface SchedulerSeatMapper extends BaseMapper<SchedulerSeat> {

    @Select({
            "select seat.*,price.price from dm_scheduler_seat seat,dm_scheduler_seat_price price",
            " where seat.scheduleId = price.scheduleId",
            " and seat.areaLevel = price.areaLevel",
            " and seat.scheduleId=#{scheduleId}",
            " and seat.x = #{x}",
            " and seat.y = #{y}"
    })
    SchedulerSeat detail(
            @Param("x")Integer x,
            @Param("y")Integer y,
            @Param("scheduleId") Long scheduleId
    );

}




